-
Notifications
You must be signed in to change notification settings - Fork 9
fix parsing bug #579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix parsing bug #579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a parsing bug where numeric properties with a value of 0 were being incorrectly filtered out during entity parsing. The fix changes the condition from checking for truthy values (if (rawValue)) to explicitly checking for undefined (if (rawValue !== undefined)), and adds fallback logic to handle cases where the API returns numbers as strings instead of numeric values.
Changes:
- Updated condition checks in entity parsing to use
!== undefinedinstead of truthy checks to properly handle falsy values like 0 - Added fallback logic in
convertPropertyValueto parse numbers from string fields when the number field is null - Added temporary test script and configuration for manual testing
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/hypergraph/src/utils/convert-property-value.ts | Enhanced number property parsing with fallback to string field and explicit undefined handling |
| packages/hypergraph/src/utils/convert-relations.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| packages/hypergraph/src/entity/find-one-public.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| packages/hypergraph/src/entity/find-many-public.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| apps/events/test-script.ts | Added temporary manual test script (should be removed) |
| apps/events/package.json | Added script command for running test script (should be removed if test-script.ts is removed) |
| .claude/settings.local.json | Added permissions for test script execution |
| .changeset/fix-number-property-parsing.md | Added changeset documentation for the bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2c5b57e to
436fe4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.